module.exports = {
	prefix: "/user/lottery",
	get: {
		"/list/detail": function() {
			var user = role.getUser(this);
			var query = this.request.query;
			this.body = ResponObj("json", user.getLotteryDetailList(query))
		},
	},
	post: {
		"/draw/:lottery_id": function() {
			var user = role.getUser(this);

			var lottery_id = this.params.lottery_id;
			var body = this.request.body;
			if (!(body.bus_id && lottery_id)) {
				throwCusError("参数错误")
			}
			this.body = ResponObj("json", user.drawLottery(body.bus_id, lottery_id))
		}
	}
}
var role = require("./role");
var BusCon = require("../../core/bus/_con");
var UserCon = require("../../core/user/_con");
var GoodsCon = require("../../core/goods/_con");
var AchCon = require("../../core/ach/_con");
var db = require("../../core/db/index");
var config = require("../../core/_include/config");
var ResponObj = require("../_include/responObj");